.\" RDLP_ROMToken.3
.\" 
.\" Copyright 2001, Andrew Arensburger.
.\" You may distribute this file under the terms of the Artistic
.\" License, as specified in the README file.
.\"
.\" $Id: RDLP_ROMToken.3,v 1.1 2001-09-05 07:29:50 arensb Exp $
.\"
.\" This man page uses the 'mdoc' formatting macros. If your 'man' uses
.\" the old 'man' package, you may run into problems.
.\"
.Dd Aug 16, 2001
.Dt RDLP_ROMToken 3
.Sh NAME
.Nm RDLP_ROMToken
.Nd find a ROM token on a PalmOS device
.Sh LIBRARY
.Pa libpconn
.Sh SYNOPSIS
.Fd #include <palm.h>
.Fd #include <pconn/pconn.h>
.Ft int
.Fn RDLP_ROMToken "PConnection *pconn" "uword cardno" "udword token" "udword *data_ptr" "uword *data_len"
.Sh DESCRIPTION
Palm devices appear to have
.Dq ROM tokens ,
which are essentially named pointers. The most useful token that the
author is aware of is
.Sq snum ,
which indicates the location of the serial number, on those Palm
devices that have a serial number that can be read in software
(\fIe.g.\fR, Palm III).
.Pp
To read the serial number, you must first call
.Nm RDLP_ROMToken
to find the location and length of the serial number, then call
.Xr RDLP_MemMove
to actually read the serial number.
.Pp
.Fa cardno
specifies the memory card on which to look. This is usually 0.
.Pp
.Fa token
specifies the four-character identifier (first letter in the
most-significant eight bits) of the ROM token to look for.
.Pp
.Fa data_ptr
will be filled in with the starting address of the data that the token
refers to.
.Pp
.Fa data_len
will be filled in with the length of the data that the token refers
to.
.Sh RETURN VALUE
.Nm
returns 0 if successful, or a negative value otherwise.
.Sh SEE ALSO
.Xr libpconn 3 ,
.Xr DlpRPC 3 ,
.Xr RDLP_MemMove 3 .
